import { Component, OnInit, AfterViewInit, ViewChild, ElementRef } from "@angular/core";
import {  ActivatedRoute } from "@angular/router";
import { ApiService } from 'src/app/core/api';
import { NzMessageService } from 'ng-zorro-antd';

@Component({
    templateUrl: "./bugDetail.html",
    styleUrls: ["./bugDetail.scss"]
})
export class BugDetailComponent implements OnInit,AfterViewInit {
    del;
    @ViewChild('bugRealizeStep')
    bugRealizeStep: ElementRef;
    @ViewChild('bugFixPlan')
    bugFixPlan: ElementRef;
    show1 = false;
    show2 = false;
    isShow1 = false;
    isShow2 = false;
    constructor(
        private api: ApiService,
        private msg: NzMessageService,
        private route: ActivatedRoute
    ) {}
    ngOnInit() {
        this.del = this.route.snapshot.data.data;
    }
    ngAfterViewInit(){
        setTimeout(()=>{
            if(this.bugRealizeStep.nativeElement.clientHeight>200){
                this.show1 = true;
            }
            if(this.bugFixPlan.nativeElement.clientHeight>200){
                this.show2 = true;
            }
        })
    }
    toggle1(){
        this.isShow1 = !this.isShow1;
    }
    toggle2(){
        this.isShow2 = !this.isShow2;
    }
}
